package com.hps.zipkinproducer.controller;

import com.hps.zipkinproducer.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heps
 * @date 2019/1/8 9:38
 */
@RestController
@RequestMapping("/users")
public class UserController {

    @Value("${test}")
    private String test;

    @GetMapping
    public User find() {
        System.out.println(test);
        User user = new User();
        user.setId(1L);
        user.setName("张三");
        return user;
    }
}
